package com.meitianhui.convenitenbuy.module.store.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2017/11/29.
 */

public class PayInfoBean implements Parcelable {
    public Map<String,String> pay_info;

    public Map<String, String> getPay_info() {
        return pay_info;
    }

    public void setPay_info(Map<String, String> pay_info) {
        this.pay_info = pay_info;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.pay_info.size());
        for (Map.Entry<String, String> entry : this.pay_info.entrySet()) {
            dest.writeString(entry.getKey());
            dest.writeString(entry.getValue());
        }
    }

    public PayInfoBean() {
    }

    protected PayInfoBean(Parcel in) {
        int pay_infoSize = in.readInt();
        this.pay_info = new HashMap<String, String>(pay_infoSize);
        for (int i = 0; i < pay_infoSize; i++) {
            String key = in.readString();
            String value = in.readString();
            this.pay_info.put(key, value);
        }
    }

    public static final Creator<PayInfoBean> CREATOR = new Creator<PayInfoBean>() {
        @Override
        public PayInfoBean createFromParcel(Parcel source) {
            return new PayInfoBean(source);
        }

        @Override
        public PayInfoBean[] newArray(int size) {
            return new PayInfoBean[size];
        }
    };
}
